<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="gan_v1beta1.html">Google Affiliate Network API</a> . <a href="gan_v1beta1.links.html">links</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#get">get(role, roleId, linkId)</a></code></p>
<p class="firstline">Retrieves data about a single link if the requesting advertiser/publisher has access to it. Advertisers can look up their own links. Publishers can look up visible links or links belonging to advertisers they are in a relationship with.</p>
<p class="toc_element">
  <code><a href="#insert">insert(role, roleId, body)</a></code></p>
<p class="firstline">Inserts a new link.</p>
<p class="toc_element">
  <code><a href="#list">list(role, roleId, linkType=None, promotionType=None, createDateMax=None, advertiserId=None, pageToken=None, relationshipStatus=None, maxResults=None, authorship=None, startDateMin=None, assetSize=None, searchText=None, startDateMax=None, createDateMin=None)</a></code></p>
<p class="firstline">Retrieves all links that match the query parameters.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="get">get(role, roleId, linkId)</code>
  <pre>Retrieves data about a single link if the requesting advertiser/publisher has access to it. Advertisers can look up their own links. Publishers can look up visible links or links belonging to advertisers they are in a relationship with.

Args:
  role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
    Allowed values
      advertisers - The requester is requesting as an advertiser.
      publishers - The requester is requesting as a publisher.
  roleId: string, The ID of the requesting advertiser or publisher. (required)
  linkId: string, The ID of the link to look up. (required)

Returns:
  An object of the form:

    { # A LinkResource.
      "isActive": True or False, # Flag for if this link is active.
      "linkType": "A String", # The link type.
      "kind": "gan#link", # The kind for one entity.
      "endDate": "A String", # Date that this link becomes inactive.
      "description": "A String", # Description.
      "name": "A String", # The logical name for this link.
      "specialOffers": { # Special offers on the link.
        "priceCut": { # An ApiMoneyProto. # Price cut on the purchase
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
        "priceCutMin": { # An ApiMoneyProto. # Minimum purchase amount for price cut promotion
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
        "freeShipping": True or False, # Whether there is free shipping
        "promotionCodes": [ # List of promotion code associated with the link
          "A String",
        ],
        "percentOff": 3.14, # Percent off on the purchase
        "percentOffMin": { # An ApiMoneyProto. # Minimum purchase amount for percent off promotion
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
        "freeGift": True or False, # Whether there is a free gift
        "freeShippingMin": { # An ApiMoneyProto. # Minimum purchase amount for free shipping promotion
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
      },
      "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days on this link. This value should be multiplied by 100 at the time of display.
        "amount": 3.14, # The amount of money.
        "currencyCode": "A String", # The 3-letter code of the currency in question.
      },
      "createDate": "A String", # Date that this link was created.
      "imageAltText": "A String", # image alt text.
      "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months on this link. This value should be multiplied by 100 at the time of display.
        "amount": 3.14, # The amount of money.
        "currencyCode": "A String", # The 3-letter code of the currency in question.
      },
      "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
      "id": "A String", # The ID of this link.
      "impressionTrackingUrl": "A String", # Tracking url for impressions.
      "promotionType": "A String", # Promotion Type
      "duration": "A String", # Duration
      "authorship": "A String", # Authorship
      "startDate": "A String", # Date that this link becomes active.
      "availability": "A String", # Availability.
      "clickTrackingUrl": "A String", # Tracking url for clicks.
      "destinationUrl": "A String", # The destination URL for the link.
    }</pre>
</div>

<div class="method">
    <code class="details" id="insert">insert(role, roleId, body)</code>
  <pre>Inserts a new link.

Args:
  role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
    Allowed values
      advertisers - The requester is requesting as an advertiser.
      publishers - The requester is requesting as a publisher.
  roleId: string, The ID of the requesting advertiser or publisher. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # A LinkResource.
    "isActive": True or False, # Flag for if this link is active.
    "linkType": "A String", # The link type.
    "kind": "gan#link", # The kind for one entity.
    "endDate": "A String", # Date that this link becomes inactive.
    "description": "A String", # Description.
    "name": "A String", # The logical name for this link.
    "specialOffers": { # Special offers on the link.
      "priceCut": { # An ApiMoneyProto. # Price cut on the purchase
        "amount": 3.14, # The amount of money.
        "currencyCode": "A String", # The 3-letter code of the currency in question.
      },
      "priceCutMin": { # An ApiMoneyProto. # Minimum purchase amount for price cut promotion
        "amount": 3.14, # The amount of money.
        "currencyCode": "A String", # The 3-letter code of the currency in question.
      },
      "freeShipping": True or False, # Whether there is free shipping
      "promotionCodes": [ # List of promotion code associated with the link
        "A String",
      ],
      "percentOff": 3.14, # Percent off on the purchase
      "percentOffMin": { # An ApiMoneyProto. # Minimum purchase amount for percent off promotion
        "amount": 3.14, # The amount of money.
        "currencyCode": "A String", # The 3-letter code of the currency in question.
      },
      "freeGift": True or False, # Whether there is a free gift
      "freeShippingMin": { # An ApiMoneyProto. # Minimum purchase amount for free shipping promotion
        "amount": 3.14, # The amount of money.
        "currencyCode": "A String", # The 3-letter code of the currency in question.
      },
    },
    "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days on this link. This value should be multiplied by 100 at the time of display.
      "amount": 3.14, # The amount of money.
      "currencyCode": "A String", # The 3-letter code of the currency in question.
    },
    "createDate": "A String", # Date that this link was created.
    "imageAltText": "A String", # image alt text.
    "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months on this link. This value should be multiplied by 100 at the time of display.
      "amount": 3.14, # The amount of money.
      "currencyCode": "A String", # The 3-letter code of the currency in question.
    },
    "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
    "id": "A String", # The ID of this link.
    "impressionTrackingUrl": "A String", # Tracking url for impressions.
    "promotionType": "A String", # Promotion Type
    "duration": "A String", # Duration
    "authorship": "A String", # Authorship
    "startDate": "A String", # Date that this link becomes active.
    "availability": "A String", # Availability.
    "clickTrackingUrl": "A String", # Tracking url for clicks.
    "destinationUrl": "A String", # The destination URL for the link.
  }


Returns:
  An object of the form:

    { # A LinkResource.
      "isActive": True or False, # Flag for if this link is active.
      "linkType": "A String", # The link type.
      "kind": "gan#link", # The kind for one entity.
      "endDate": "A String", # Date that this link becomes inactive.
      "description": "A String", # Description.
      "name": "A String", # The logical name for this link.
      "specialOffers": { # Special offers on the link.
        "priceCut": { # An ApiMoneyProto. # Price cut on the purchase
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
        "priceCutMin": { # An ApiMoneyProto. # Minimum purchase amount for price cut promotion
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
        "freeShipping": True or False, # Whether there is free shipping
        "promotionCodes": [ # List of promotion code associated with the link
          "A String",
        ],
        "percentOff": 3.14, # Percent off on the purchase
        "percentOffMin": { # An ApiMoneyProto. # Minimum purchase amount for percent off promotion
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
        "freeGift": True or False, # Whether there is a free gift
        "freeShippingMin": { # An ApiMoneyProto. # Minimum purchase amount for free shipping promotion
          "amount": 3.14, # The amount of money.
          "currencyCode": "A String", # The 3-letter code of the currency in question.
        },
      },
      "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days on this link. This value should be multiplied by 100 at the time of display.
        "amount": 3.14, # The amount of money.
        "currencyCode": "A String", # The 3-letter code of the currency in question.
      },
      "createDate": "A String", # Date that this link was created.
      "imageAltText": "A String", # image alt text.
      "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months on this link. This value should be multiplied by 100 at the time of display.
        "amount": 3.14, # The amount of money.
        "currencyCode": "A String", # The 3-letter code of the currency in question.
      },
      "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
      "id": "A String", # The ID of this link.
      "impressionTrackingUrl": "A String", # Tracking url for impressions.
      "promotionType": "A String", # Promotion Type
      "duration": "A String", # Duration
      "authorship": "A String", # Authorship
      "startDate": "A String", # Date that this link becomes active.
      "availability": "A String", # Availability.
      "clickTrackingUrl": "A String", # Tracking url for clicks.
      "destinationUrl": "A String", # The destination URL for the link.
    }</pre>
</div>

<div class="method">
    <code class="details" id="list">list(role, roleId, linkType=None, promotionType=None, createDateMax=None, advertiserId=None, pageToken=None, relationshipStatus=None, maxResults=None, authorship=None, startDateMin=None, assetSize=None, searchText=None, startDateMax=None, createDateMin=None)</code>
  <pre>Retrieves all links that match the query parameters.

Args:
  role: string, The role of the requester. Valid values: 'advertisers' or 'publishers'. (required)
    Allowed values
      advertisers - The requester is requesting as an advertiser.
      publishers - The requester is requesting as a publisher.
  roleId: string, The ID of the requesting advertiser or publisher. (required)
  linkType: string, The type of the link.
    Allowed values
      banner - 
      text - 
  promotionType: string, The promotion type. (repeated)
    Allowed values
      coupon - 
      free_gift - 
      free_shipping - 
      percent_off - 
      price_cut - 
  createDateMax: string, The end of the create date range.
  advertiserId: string, Limits the resulting links to the ones belonging to the listed advertisers. (repeated)
  pageToken: string, The value of 'nextPageToken' from the previous page. Optional.
  relationshipStatus: string, The status of the relationship.
    Allowed values
      approved - 
      available - 
  maxResults: integer, Max number of items to return in this page. Optional. Defaults to 20.
  authorship: string, The role of the author of the link.
    Allowed values
      advertiser - 
      publisher - 
  startDateMin: string, The beginning of the start date range.
  assetSize: string, The size of the given asset. (repeated)
  searchText: string, Field for full text search across title and merchandising text, supports link id search.
  startDateMax: string, The end of the start date range.
  createDateMin: string, The beginning of the create date range.

Returns:
  An object of the form:

    {
    "nextPageToken": "A String", # The next page token.
    "items": [ # The links.
      { # A LinkResource.
          "isActive": True or False, # Flag for if this link is active.
          "linkType": "A String", # The link type.
          "kind": "gan#link", # The kind for one entity.
          "endDate": "A String", # Date that this link becomes inactive.
          "description": "A String", # Description.
          "name": "A String", # The logical name for this link.
          "specialOffers": { # Special offers on the link.
            "priceCut": { # An ApiMoneyProto. # Price cut on the purchase
              "amount": 3.14, # The amount of money.
              "currencyCode": "A String", # The 3-letter code of the currency in question.
            },
            "priceCutMin": { # An ApiMoneyProto. # Minimum purchase amount for price cut promotion
              "amount": 3.14, # The amount of money.
              "currencyCode": "A String", # The 3-letter code of the currency in question.
            },
            "freeShipping": True or False, # Whether there is free shipping
            "promotionCodes": [ # List of promotion code associated with the link
              "A String",
            ],
            "percentOff": 3.14, # Percent off on the purchase
            "percentOffMin": { # An ApiMoneyProto. # Minimum purchase amount for percent off promotion
              "amount": 3.14, # The amount of money.
              "currencyCode": "A String", # The 3-letter code of the currency in question.
            },
            "freeGift": True or False, # Whether there is a free gift
            "freeShippingMin": { # An ApiMoneyProto. # Minimum purchase amount for free shipping promotion
              "amount": 3.14, # The amount of money.
              "currencyCode": "A String", # The 3-letter code of the currency in question.
            },
          },
          "epcSevenDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past seven days on this link. This value should be multiplied by 100 at the time of display.
            "amount": 3.14, # The amount of money.
            "currencyCode": "A String", # The 3-letter code of the currency in question.
          },
          "createDate": "A String", # Date that this link was created.
          "imageAltText": "A String", # image alt text.
          "epcNinetyDayAverage": { # An ApiMoneyProto. # The sum of fees paid to publishers divided by the total number of clicks over the past three months on this link. This value should be multiplied by 100 at the time of display.
            "amount": 3.14, # The amount of money.
            "currencyCode": "A String", # The 3-letter code of the currency in question.
          },
          "advertiserId": "A String", # The advertiser id for the advertiser who owns this link.
          "id": "A String", # The ID of this link.
          "impressionTrackingUrl": "A String", # Tracking url for impressions.
          "promotionType": "A String", # Promotion Type
          "duration": "A String", # Duration
          "authorship": "A String", # Authorship
          "startDate": "A String", # Date that this link becomes active.
          "availability": "A String", # Availability.
          "clickTrackingUrl": "A String", # Tracking url for clicks.
          "destinationUrl": "A String", # The destination URL for the link.
        },
    ],
    "kind": "gan#links", # The kind for a page of links.
  }</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
  <pre>Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    </pre>
</div>

</body></html>